package com.lhl.dubbo.demo.impl;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.lhl.dubbo.demo.api.NoResponse2Service;
import com.lhl.dubbo.demo.model.Result;

/**
 * @author lhl ON 2019/07/25
 */
@Service()
public class NoResponse2ServiceImpl implements NoResponse2Service {

    @Value("${service.user.name}")
    private String name;

    @Override
    public Result getResponse() {
        try {
            Thread.sleep(30000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return new Result(name, "I have response");
    }
}
